//FileComparator.java
import java.util.Comparator;

public class FileComparator implements Comparator {
 public int compare(Object a, Object b) {
   DBFile fileA = (DBFile)a;
   DBFile fileB = (DBFile)b;
   
   // Not really sure why this is needed
   // but apparently it is so using hashCode()
   // for now because it returns an int - which
   // we need for sorting.
   int fileAValue = fileA.hashCode();
   int fileBValue = fileB.hashCode();
   
   return fileAValue - fileBValue;
 }
}
